﻿@model IEnumerable<SchoolManagerMVC.Web.Areas.Courses.ViewModels.CourseViewModel>

@{
    ViewBag.Title = "StudentsCourses";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>My Courses</h2>
<table>
    <tr>
        <th>
            Course Name
        </th>
        <th>
            Teacher
        </th>
        <th>
            Department
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.course.CourseName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TeacherName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DepartmentName)
        </td>        
    </tr>
}

</table>
<br /><br />
@Html.ActionLink("Back", "Details", "Home", new { id = ViewBag.StudentID }, null)